$("#checkFormData").find("input").attr("disabled",true);
// 审核拒绝按钮
$("#checkFalse").on("click", function() {
	TextArea($(this),false);
});
$("#checkTrue").on("click", function() {
	TextArea($(this),true);
});
function TextArea($this,isok){
	$("#checkFormData").parent().css("z-index", "900");
	var templateDialog ='<h4>'+(isok?"审核通过":"审核拒绝")+'</h4>'+
	'<form class="form-horizontal">'+
		'<div class="control-group">'+
			'<label class="control-label" for="inputEmail">备注：</label>'+
			'<div class="controls">'+
				'<textarea id="fieldT"  rows="5"></textarea>'+
			'</div>'+
		'</div>'+
	'</form>';
	bootbox.dialog(templateDialog, [{
		"label": "提交",
		"class": "btn-primary",
		"callback": function() {
			$.ajax({
			  url: "/Handler/DataHandler.ashx",
			  type: "post",
			  dataType: "json",
			  data: {
			    fun: "f_0002",
			    id: $("#checkFormData").parent().attr("dataid"),
			    Guest_AuditRemark: $("#fieldT").val(),
			    //300 通过 400拒绝
			    Guest_Stauts: isok?"300":"400"  
			  },
			  beforeSend: function() {
			    //数据加载冻屏
			    $this.button('loading');
			  },
			  success: function(msg) {
			    //数据加载完毕解除冻屏
			    $this.button('reset');
			    if(msg.r_code=="1"){
			      toastr.success(msg.r_info, '系统提示：');
			      $("#checkFormData").modal('hide');
			      $("#checkFormData").remove();
			      //刷新页面
			      setTimeout(function () {
			          window.location.href = window.location.href;
			      }, 1000);
			    }else if(msg.r_code=="0"){
			      toastr.error(msg.r_info, '错误提示：');
			    }
			  }
			});
			$("#checkFormData").parent().css("z-index","9999");  
		}
	}, {
		"label": "取消",
		"class": "btn",
		"callback": function() {
			$("#checkFormData").parent().css("z-index","9999");  
		}
	}]);
};